home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
SWDOS12
/
RENAME.ASM
< prev
next >
Wrap
Assembly Source File
|
1995-02-10
|
1KB
|
39 lines
;******************************************************************
;* RENAME.ASM *
;* Source file for SoftWeyr enhanced DOS toolbox *
;* version 1.1 *
;* Copyright (c) by SoftWeyr,1994 *
;******************************************************************
MODEL TPASCAL
.DATA
EXTRN DosError :word
.CODE
Public RenameFile
EXtrn Asciiz:Far
RenameFile Proc far OldName:DWORD,NewName:DWORD
;Procedure RenameFile(OldName,NewName:String);
LOCAL AOldName:Byte:80,ANewName:Byte:80=LSIZE
Push DS
;Load string address
LDS SI,NewName
LEA DI,ANewName
CALL Asciiz
LDS SI,OldName
LEA DI,AOldName
CALL Asciiz
PUSH SS
PUSH SS
POP DS
POP ES
LEA DX,AOldName
LEA DI,ANewName
mov ah,56h
Int 21h
Pop ds
jc @@Error
xor ax,ax
@@Error: mov DosError,Ax
RET
Endp
end